<?php
class  Model_Association implements Model_IEntity
{
	//field id_association
	private $_id_association = null;
	public function setId_association($value)
	{
		$this->_id_association = $value;
	}

	public function getId_association()
	{
		return $this->_id_association;
	}

	//field nom
	private $_nom = null;
	public function setNom($value)
	{
		$this->_nom = htmlremove($value);
	}

	public function getNom()
	{
		return $this->_nom;
	}

	//field description
	private $_description = null;
	public function setDescription($value)
	{
		$this->_description = htmlfilter($value, array('script', 'iframe'));
	}

	public function getDescription()
	{
		return $this->_description;
	}

	//field telephone
	private $_telephone = null;
	public function setTelephone($value)
	{
		$this->_telephone = htmlremove($value);
	}

	public function getTelephone()
	{
		return $this->_telephone;
	}

	//field fax
	private $_fax = null;
	public function setFax($value)
	{
		$this->_fax = htmlremove($value);
	}

	public function getFax()
	{
		return $this->_fax;
	}

	//field email
	private $_email = null;
	public function setEmail($value)
	{
		$this->_email = htmlremove($value);
	}

	public function getEmail()
	{
		return $this->_email;
	}

	//field responsable
	private $_responsable = null;
	public function setResponsable($value)
	{
		$this->_responsable = htmlremove($value);
	}

	public function getResponsable()
	{
		return $this->_responsable;
	}

        //field login
        private $_login = null;
        public function setLogin($value)
        {
            $this->_login = htmlremove($value);
        }

        public function getLogin()
        {
            return $this->_login;
        }

        //field password
        private $_password = null;
        public function setPassword($value)
        {
            $this->_password = $value;
        }

        public function setMd5Password($value)
        {
            $this->_password = md5($value);
        }

        public function getPassword()
        {
            return $this->_password;
        }

	//field id_adresse
	private $adresse = null;
	public function setAdresse(Model_Adresse $value)
	{
		$this->adresse = $value;
	}

	public function getAdresse()
	{
		return $this->adresse;
	}

	public function __toString()
	{
		return $this->getNom();
	}

        public function login($pass)
        {
            if(md5($pass) == $this->getPassword())
            {
                return true;
            }
            else
            {
                return false;
            }
        }
}
